package utils;

import entity.Book;

import java.util.ArrayList;
import java.util.List;

public class ParseUtils {
    Book book = new Book();


    public List<String> BookToCsvStringList(List<Book> books){
        ArrayList<String> list = new ArrayList<>();

        String s = null;
        for (Book book1 : books) {
           s= book1.bookTocsvString();
           list.add(s);
        }
        return list;

    }
    public String BookToString(){
        return book.getId()+","+book.getName()+","+book.getAuthor()+","+book.getPublish()+","+book.getSort();
    }
}
